package response

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

type JsonResponseFail struct {
	Code int         `json:"code"`
	Msg  interface{} `json:"msg"`
}

func Error(c *gin.Context, code int, msg interface{}) {
	json := &JsonResponseFail{
		Code: code,
		Msg:  msg,
	}
	c.JSON(http.StatusOK, json)
}
